package gruppe7.data;

import gruppe7.tlrs.Station;
import java.util.ArrayList;


public class StationController {

    private static StationController instance = null;
    private StationProvider provider;

    private StationController(StationProvider provider) {
        this.provider = provider;
    }

    public static StationController getInstance() {
        if (instance == null) {
            instance = new StationController(new DBStationProvider());
        }
        return instance;
    }

    public Station getStation(String name) {

        return provider.getStation(name);
    }

    public ArrayList<String> getStationList() {
        return provider.getStationList();
    }

    public Station updateStation(Station station)
    {
        return provider.updateStationInfo(station);
    }
}
